import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzSpaceModule } from 'ng-zorro-antd/space';

@Component({
  selector: 'app-space-wrap',
  standalone: true,
  imports: [NzButtonModule, NzIconModule, NzSpaceModule, CommonModule],
  template: `
    <div class="demo">
      <nz-space nzWrap>
        @for(item of items; track $index) {
        <button nz-button nzType="primary" *nzSpaceItem>{{ item }}</button>
        }
      </nz-space>
    </div>
  `,
  styles: ``,
})
export class SpaceWrapComponent {
  items = Array.from({ length: 30 }).map((_, index) => `按钮${index}`);
}
